package com.unbox.admin.hystrix;

import com.baomidou.mybatisplus.extension.api.R;
import com.unbox.admin.entity.Role;
import com.unbox.admin.fegin.RoleFegin;
import com.unbox.common.response.UnboxResponse;
import com.unbox.common.table.UnBoxPage;
import org.springframework.stereotype.Component;
import java.util.List;

/**
 * <p>
 * <角色业务熔断配置
 * </p>
 *
 * @author 王振宇
 * @since 2021-03-01
 */
@Component
public class RoleHystrix implements RoleFegin {

    @Override
    public UnboxResponse<UnBoxPage> getPageList(Role role, Integer pageNo, Integer pageSize) {
        return new UnboxResponse
                .Builder<UnBoxPage>()
                .serviceFail()
                .build();
    }

    @Override
    public UnboxResponse<List<Role>> getList(Role role) {
        return new UnboxResponse
                .Builder<List<Role>>()
                .serviceFail()
                .build();
    }

    @Override
    public UnboxResponse<Role> info(Role role) {
        return new UnboxResponse
                .Builder<Role>()
                .serviceFail()
                .build();
    }

    @Override
    public UnboxResponse<List<Role>> idsRoles(List<Integer> ids) {
        return new UnboxResponse
                .Builder<List<Role>>()
                .serviceFail()
                .build();
    }

    @Override
    public UnboxResponse<Boolean> save(Role role) {
        return new UnboxResponse
                .Builder<Boolean>()
                .serviceFail()
                .build();
    }

    @Override
    public UnboxResponse<Boolean> batchSave(List<Role> roles) {
        return new UnboxResponse
                .Builder<Boolean>()
                .serviceFail()
                .build();
    }

    @Override
    public UnboxResponse<Boolean> update(Role role) {
        return new UnboxResponse
                .Builder<Boolean>()
                .serviceFail()
                .build();
    }

    @Override
    public UnboxResponse<Boolean> batchUpdate(List<Role> roles) {
        return new UnboxResponse
                .Builder<Boolean>()
                .serviceFail()
                .build();
    }

    @Override
    public UnboxResponse<Boolean> delete(Role role) {
        return new UnboxResponse
                .Builder<Boolean>()
                .serviceFail()
                .build();
    }

    @Override
    public UnboxResponse<Boolean> deleteBatch(List<Integer> ids) {
        return new UnboxResponse
                .Builder<Boolean>()
                .serviceFail()
                .build();
    }
}
